<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <title>分类</title>
    <div th:include="web/head"></div>
</head>
<body>
<div th:include="web/header"></div>

<table class="table table-hover">
    <thead>
    <tr>
        <th>ID</th>
        <th>标题</th>
        <th>发布时间</th>
    </tr>
    </thead>
    <tbody>
    <tr th:each="article : ${list}">
        <th scope="row" th:text="${article.id}">ID</th>
        <td><a href="" th:href="'/article/' + ${article.id}" th:text="${article.title}">标题</a></td>
        <td th:text="${article.insertTime}">发布时间</td>
    </tr>
    </tbody>
</table>

<nav aria-label="...">
    <ul class="pager">
        <li><a href="#" th:if="${pagination.prePage>=0}"
               th:href="'/category/'+${categoryId}+'?page=' + ${pagination.prePage}">上一页</a></li>
        <li><a href="#" th:if="${pagination.nextPage}"
               th:href="'/category/'+${categoryId}+'?page=' + ${pagination.nextPage}">下一页</a></li>
    </ul>
</nav>

<div th:include="web/footer"></div>

</body>
</html>